package com.settlement.system.service.impl;

import com.settlement.system.mapper.BaseMapper;
import com.settlement.system.mapper.TblWpAdjustBillDtlMapper;
import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.TblWpAdjustBillDtl;
import com.settlement.system.service.ITblWpAdjustBillDtlService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.Map;

/**
 * WP-导入调整明细 服务实现类
 * @author xiaochuan
 * @since 2022-07-26
 */
@Slf4j
@Service
public class TblWpAdjustBillDtlServiceImpl extends BaseServiceImpl implements ITblWpAdjustBillDtlService {

    @Resource
    private TblWpAdjustBillDtlMapper tblWpAdjustBillDtlMapper;

    @Override
    public BaseMapper init() {
        return tblWpAdjustBillDtlMapper;
    }


    @Override
    public TblWpAdjustBillDtl getFoot(Map<String, Object> params) throws ServiceException {
        try {
            return tblWpAdjustBillDtlMapper.getFoot(params);
        } catch (Exception ex) {
            log.error("获取合计异常", ex);
            throw new ServiceException("获取合计异常", ex);
        }
    }
}

